/*
 * @Author: 李石
 * @Date: 2024-04-24 17:25:47
 * @LastEditors: lishi
 * @LastEditTime: 2024-07-11 09:02:40
 * @Description: 
 * Copyright (c) 2024 by ${lishi0105@163.com}, All Rights Reserved. 
 */
#ifndef _FRAME_PUSHER_HPP_
#define _FRAME_PUSHER_HPP_
#include <mutex>
#include <stdint.h>
#include <iostream>
#include "FrameData.hpp"
#include "mk_mediakit.h"
#include "BaseShared.hpp"

class FramePusher : public SharedBase<FramePusher>
{
public:
    ~FramePusher();
    FramePusher(const std::string &app, const std::string &stream, int codec_id);
    bool PushFrameData(const FrameData::Ptr frame);
    bool PushFrameData(const uint8_t *data, size_t size, uint64_t pts = 0);
    bool PushSeiFrame(const uint8_t *data, size_t size);
private:
    mk_media media;
    std::string m_app_name;
    std::string m_stream_name;
    int32_t m_codec_id;
    bool m_init_success;
};
#endif // _FRAME_PUSHER_HPP_